package com.yjd.job.model;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;

import com.yjd.comm.base.model.Model;

/**
 * job信息
 * 
 * @author ready
 * @date 2014-8-8
 */
public class JobModel extends Model {

	private static final long serialVersionUID = 1L;

	/**
	 * 编号
	 */
	private Long id_job;
	/**
	 * 类型
	 */
	@NotEmpty(message="任务类型不能为空")
	private String type;

	/**
	 * job执行时间
	 */
	@NotEmpty(message="任务定时表达式不能为空")
	private String cron;
	/**
	 * 是否执行
	 */
	@NotNull
	@Max(1)
	@Min(0)
	private Integer enable;
	/**
	 * 描述
	 */
	@NotEmpty(message="任务描述不能为空")
	private String description;
	/**
	 * 创建人
	 */
	private Long id_user_create;
	/**
	 * 创建时间
	 */
	private Long create_time;
	/**
	 * 最后修改人
	 */
	private Long id_user_modify;
	/**
	 * 最后修改时间
	 */
	private Long modify_time;
	/**
	 * 上次执行时间
	 */
	private Long last_exectime;
	/**
	 * 下次预计执行时间
	 */
	private Long next_exectime;
	/**
	 * job失败重复执行次数
	 */
	private Integer retry_times;
	/**
	 * job执行失败次数
	 */
	private Integer fail_times;

	
	public Integer getFail_times() {
		return fail_times;
	}

	public void setFail_times(Integer fail_times) {
		this.fail_times = fail_times;
	}

	public Integer getRetry_times() {
		return retry_times;
	}

	public void setRetry_times(Integer retry_times) {
		this.retry_times = retry_times;
	}

	public Long getId_job() {
		return id_job;
	}

	public void setId_job(Long id_job) {
		this.id_job = id_job;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getCron() {
		return cron;
	}

	public void setCron(String cron) {
		this.cron = cron;
	}

	public Integer getEnable() {
		return enable;
	}

	public void setEnable(Integer enable) {
		this.enable = enable;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Long getId_user_create() {
		return id_user_create;
	}

	public void setId_user_create(Long id_user_create) {
		this.id_user_create = id_user_create;
	}

	public Long getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Long create_time) {
		this.create_time = create_time;
	}

	public Long getId_user_modify() {
		return id_user_modify;
	}

	public void setId_user_modify(Long id_user_modify) {
		this.id_user_modify = id_user_modify;
	}

	public Long getModify_time() {
		return modify_time;
	}

	public void setModify_time(Long modify_time) {
		this.modify_time = modify_time;
	}

	public Long getLast_exectime() {
		return last_exectime;
	}

	public void setLast_exectime(Long last_exectime) {
		this.last_exectime = last_exectime;
	}

	public Long getNext_exectime() {
		return next_exectime;
	}

	public void setNext_exectime(Long next_exectime) {
		this.next_exectime = next_exectime;
	}

}
